package tp4.composite;

import java.io.File;

public abstract class Composant {
	private String path;

	public Composant(String path) {
		super();
		this.path = path;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}
	public String getName(){
		int last = path.lastIndexOf(File.separator);
		return path.substring((last<0) ? 0 : last);
	}
	@Override
	public String toString() {
		return path;
	}

}
